package com.zhang.modules.api.service.impl;

import com.zhang.common.jpa.service.impl.BaseServiceImpl;
import com.zhang.dataSource.ApiDBservice;
import com.zhang.modules.api.entity.Api;
import com.zhang.modules.api.rep.ApiRep;
import com.zhang.modules.api.service.IApiService;
import com.zhang.principal.ApiInfo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ApiService extends BaseServiceImpl<ApiRep, Api,String> implements IApiService, ApiDBservice {


    public Api findByNameEquals(String name){
        return getRep().findByNameEquals(name);
    }

    public Api findByPathEquals(String path){
        Api api = new Api();
        return getRep().findByPathEquals(path);
    }

    public ApiInfo findWithPathEquals(String path){
        Api api = new Api();
        return getRep().findByPathEquals(path);
    }


    public List<Api> findApi(){
        return getRep().findApi();
    }
}
